package com.monsky.power.current;

import com.monsky.power.share.Commond;

class UserState {

	private CommondQueue commondQueue;
	
	private int currentPageNumber;

	public CommondQueue getCommondQueue() {
		return commondQueue;
	}

	public void setCommondQueue(CommondQueue commondQueue) {
		this.commondQueue = commondQueue;
	}

	public int getCurrentPageNumber() {
		return currentPageNumber;
	}

	public void setCurrentPageNumber(int currentPageNumber) {
		this.currentPageNumber = currentPageNumber;
	}

	public UserState(CommondQueue commondQueue, int currentPageNumber) {
		this.commondQueue = commondQueue;
		this.currentPageNumber = currentPageNumber;
	}

	public UserState() {
		this(new CommondQueue(), 1);
	}

	public void offerCommond(Commond commond){
		this.commondQueue.offer(commond);
	}
	
	public Commond peekCommond(){
		return this.commondQueue.poll();
	}
	
	
}
